import { Config, Provide } from '@midwayjs/decorator';
import { IWebMiddleware } from '@midwayjs/koa';
import * as jwt from 'koa-jwt';

@Provide()
export class Jwt implements IWebMiddleware {
  @Config('jwt')
  jwtConfig;

  resolve() {
    return jwt(this.jwtConfig);
  }
}
